# Created by 黄景涛
# DATE: 2024/11/13
from pathlib import Path

import yaml
from faker import Faker

fk = Faker(locale='zh_CN')

# 根目录
BASE_ROOT = Path(__file__).parent.as_posix()
# 获取配置信息
with open('./config/config.yaml', mode='r', encoding='utf8') as f:
    cfg = yaml.safe_load(f)

# 请求头配置
headers = {
    "User-Agent": fk.user_agent(),
    "Cookie": cfg.get('Cookie', None),
    "X-Csrftoken": cfg.get('X-Csrftoken', None),
    "Recently-Portal-Id": cfg.get('Recently-Portal-Id', None)
}
